package com.focus.xyz.main.pages;

import com.focus.xyz.core.common.keyword.Action;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

/**
 * Created by chenmeng on 2016/5/24.
 */
public class XyzHomePage {
    private Action action;

    @FindBy(id="logout")
    private WebElement logoutBtn;

    public XyzHomePage(WebDriver driver,Action action){
        this.action = action;
        PageFactory.initElements(driver,this);
    }

    public void logout() throws Exception{
        action.click(logoutBtn);
    }
}
